<Query Kind="Program" />

void Main()
{
	string file =	@"C:\Code\Defender\Defender\Defender\bin\x86\Debug\FRAMETIME_12_46.txt";
	file.Dump();
	
	FrameTimeStats fts = new FrameTimeStats(file);
	//fts.FrameTimes.Dump();
	
	fts.FrameTimes.Min().Dump("MIN");
	fts.FrameTimes.Max().Dump("MAX");
	fts.FrameTimes.Average(x => x.TotalMilliseconds).Dump("AVG");
	fts.FrameTimes.Count().Dump("COUNT");
}

// Define other methods and classes here
public class FrameTimeStats
{
	public List<TimeSpan> FrameTimes {get; private set;}
	
	public FrameTimeStats(string fileName)
	{
		using(var fs = File.Open(fileName, FileMode.Open))
		{
			this.FrameTimes = new List<TimeSpan>();
			StreamReader sr = new StreamReader(fs);
			while(!sr.EndOfStream)
			{
				double value = Convert.ToDouble(sr.ReadLine());
				this.FrameTimes.Add(TimeSpan.FromMilliseconds(value));				
			}
		}
	}
}